%tr{id: dom_id(runner)}
  %td
    - if runner.shared?
      %span.label.label-success 共享的
    - else
      %span.label.label-info 特定的
    - unless runner.active?
      %span.label.label-danger 暂停的

  %td
    = link_to admin_runner_path(runner) do
      = runner.short_sha
  %td
    = runner.description
  %td
    - if runner.shared?
      n/a
    - else
      = runner.projects.count(:all)
  %td
    #{runner.builds.count(:all)}
  %td
    - runner.tag_list.each do |tag|
      %span.label.label-primary
        = tag
  %td
    - if runner.contacted_at
      #{time_ago_in_words(runner.contacted_at)}之前
    - else
      从未
  %td
    .pull-right
      = link_to '编辑', admin_runner_path(runner), class: 'btn btn-sm'
      &nbsp;
      - if runner.active?
        = link_to '暂停', [:pause, :admin, runner], data: { confirm: "确定要继续么？" }, method: :get, class: 'btn btn-danger btn-sm'
      - else
        = link_to '继续', [:resume, :admin, runner], method: :get, class: 'btn btn-success btn-sm'
      = link_to '删除', [:admin, runner], data: { confirm: "确定要继续么？" }, method: :delete, class: 'btn btn-danger btn-sm'

